package com.yc.spring.bank.bean;

import org.springframework.stereotype.Service;

// 默认的名字是：类名 + 首字母小写
@Service
public class Record {
	
	private Integer id;
	private Integer accountId;
	private Double money;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getAccountId() {
		return accountId;
	}
	public void setAccountId(Integer accountId) {
		this.accountId = accountId;
	}
	public Double getMoney() {
		return money;
	}
	public void setMoney(Double money) {
		this.money = money;
	}

	public int add(int a, int b){
		return a / b;
	}

	public int sub(int a , int b) throws InterruptedException {
		Thread.sleep((long) (Math.random() * 1000));
		return a - b;
	}
}
